import request from '@/axios';
import { baseUrl } from '@/config/env';

// 分类新增
export const classificationAdd = (data) => request({
    url: baseUrl + '/classification/add',
    method: 'post',
    data
})
// 分类更新
export const classificationUpdate = (data) => request({
    url: baseUrl + '/classification/update',
    method: 'post',
    data
})
// 分类删除
export const classificationDelete = (id) => request({
    url: baseUrl + `/classification/delete/${id}`,
    method: 'get'
})
// 分类列表
export const classificationList = (data) => request({
    url: baseUrl + `/classification/select`,
    method: 'post',
    data
})


// 商品新增
export const productListAdd = (data) => request({
    url: baseUrl + '/productList/add',
    method: 'post',
    data
})
// 商品更新
export const productListUpdate = (data) => request({
    url: baseUrl + '/productList/update',
    method: 'post',
    data
})
// 商品删除
export const productListDelete = (id) => request({
    url: baseUrl + `/productList/delete/${id}`,
    method: 'get'
})
// 商品列表
export const productListList = (data) => request({
    url: baseUrl + `/productList/select`,
    method: 'post',
    data
})
